using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using CjaxExam.Models;
using CjaxExam.Models.DataBase;
using CjaxExam.Models.Interfaces;
using CjaxExam.Models.Entities;

namespace CjaxExam.Controllers
{
    public class kaoshengController : Controller
    {
        //
        // GET: /kaosheng/

        public ActionResult Index()
        {
            return View();
        }
        public ActionResult Info()
        {
            return View();
        }
        public ActionResult New()
        {
             var dataContext = new ForExamDataContext();
            String  name=(String)this.Session["userName"];
            String id = (String)this.Session["userID"];

            ForExam newly = new ForExam();
            ViewData["e"] = newly.GetExamByUser(name);
            return View();
        }
        public ActionResult History(string name)
        {
            ForExam his = new ForExam();
            ViewData["e"] = his.GetExamByUser(name);
            return View();
        }
    }
}
